import { request } from 'umi';

export interface UniversityMajorScoreListItem {
  id: number;
  universityMajorId: number;
  enrollYear: number;
  province: string;
  planCount: number;
  score: number;
  minRank: number;
  status: string;
  universityName?: string;
  majorName?: string;
  createBy?: string;
  createTime?: string;
  updateBy?: string;
  updateTime?: string;
  remark?: string;
}

export async function getUniversityMajorScoreList(params?: any) {
  return request('/university/major/score/list', {
    method: 'GET',
    params,
  });
}

export async function addUniversityMajorScore(data: Partial<UniversityMajorScoreListItem>) {
  return request('/university/major/score', {
    method: 'POST',
    data,
  });
}

export async function updateUniversityMajorScore(data: Partial<UniversityMajorScoreListItem>) {
  return request('/university/major/score', {
    method: 'PUT',
    data,
  });
}

export async function deleteUniversityMajorScore(id: number) {
  return request(`/university/major/score/${id}`, {
    method: 'DELETE',
  });
} 